#ifndef SunColorMap_First
#define SunColorMap_First
#ifdef __GNUG__
#pragma interface
#endif

#include "WindowColorMap.h"

//---- SunColorMap -------------------------------------------------------------

class SunColorMap : public WindowIndexMapper {
	static int cmsno;
	static byte *gamma_map;

	char *type, *name;
	int *usecnt;

	u_long FindRGB(RGB *rgb);
	u_long FindGray(int gray);
public:

	SunColorMap(int d);
	SunColorMap(SunColorMap *from);
	~SunColorMap();
	void DevInstall(Port *port);
	u_long DevRGB2Index2(RGB *rgb);
	u_long DevAllocateAndSetCell(long id, RGB *rgb, WindowPort*);
	WindowColorMap *DevMakeCopy(WindowColorMap *from);
};

#endif
